﻿<UserControl x:Class="GBlason.Control.MenuControl.PreferenceMenu"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:Properties="clr-namespace:GBlason.Properties" xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
             xmlns:ViewModel="clr-namespace:GBlason.ViewModel"
             xmlns:CustomUserControl="clr-namespace:GBlason.Control.CustomUserControl"
             xmlns:Converter="clr-namespace:GBlason.Common.Converter"
             xmlns:General="clr-namespace:GBlason.ViewModel.General" mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    
    <ScrollViewer Grid.Row="2" VerticalScrollBarVisibility="Auto"
                          HorizontalScrollBarVisibility="Auto"
                          Margin="8">
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="16"/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            
            <Image Grid.Column="0"
                           Grid.Row="0"
                           Source="/Pictures\Icons16\color_management.png"
                           Width="16" Height="16"/>
            <TextBlock Grid.Column="1"
                               Text="{x:Static Properties:Resources.PropertiesBlasonBackgroundHeader}"
                               Margin="8"/>
            <xctk:ColorPicker Grid.Column="2"
                              SelectedColor="{Binding Source={x:Static General:GlobalApplicationViewModel.GetApplicationViewModel},
                Path=BlasonViewerBackgroundColor.Color,
                Mode=TwoWay}"
                              AvailableColorsHeader="{x:Static Properties:Resources.ColorPickerAvailableColorsHeader}"
                              ShowRecentColors="True"
                              RecentColorsHeader="{x:Static Properties:Resources.ColorPickerRecentColorsHeader}"
                              StandardColorsHeader="{x:Static Properties:Resources.ColorPickerStandardColorsHeader}"
                              Margin="0,2">

            </xctk:ColorPicker>

            <Image Grid.Column="0"
                           Grid.Row="1"
                           Source="pack://application:,,,/Pictures\Icons16\locate.png"
                           Width="16" Height="16"/>
            <DockPanel Grid.Column="1"
                       Grid.Row="1">
                <Image Source="pack://application:,,,/Pictures\Icons16\exclamation.png"
                       Margin="0,0,4,0"
                       VerticalAlignment="Center"
                       DockPanel.Dock="Right">
                    <Image.ToolTip>
                        <TextBlock TextWrapping="Wrap" Text="{x:Static Properties:Resources.ToolTipLanguageChangeWarning}"/>
                    </Image.ToolTip>
                </Image>
                <TextBlock Text="{x:Static Properties:Resources.PropertiesCultureHeader}"
                           Margin="8"/>

            </DockPanel>
            <CustomUserControl:CommandComboBox Grid.Column="2"
                                               Grid.Row="1"
                                               Margin="0,2,0,2"
                                               ItemsSource="{Binding Source={x:Static General:GbrFileViewModel.GetResources}, Path=SupportedLanguages}"
                                               SelectedItem="{Binding Source={x:Static General:GlobalApplicationViewModel.GetApplicationViewModel}, Path=PropertyPreferenceCultureInfo}"
                                               ItemTemplate="{StaticResource ResourceKey=LanguageDataTemplate}">
            </CustomUserControl:CommandComboBox>
        </Grid>
    </ScrollViewer>
</UserControl>
